.TH g_spatial 1 "Thu 26 Aug 2010" "" "GROMACS suite, VERSION 4.5"
.SH NAME
g_spatial - calculates the spatial distribution function (more control than g_sdf)

.B VERSION 4.5
.SH SYNOPSIS
\f3g_spatial\fP
.BI "\-s" " topol.tpr "
.BI "\-f" " traj.xtc "
.BI "\-n" " index.ndx "
.BI "\-[no]h" ""
.BI "\-[no]version" ""
.BI "\-nice" " int "
.BI "\-b" " time "
.BI "\-e" " time "
.BI "\-dt" " time "
.BI "\-[no]w" ""
.BI "\-[no]pbc" ""
.BI "\-[no]div" ""
.BI "\-ign" " int "
.BI "\-bin" " real "
.BI "\-nab" " int "
.SH DESCRIPTION
\&g_spatial calculates the spatial distribution function and 
\&outputs it in a form that can be read by VMD as Gaussian98 cube format. 
\&This was developed from template.c (gromacs\-3.3). 
\&For a system of 32K atoms and a 50ns trajectory, the SDF can be generated 
\&in about 30 minutes, with most of the time dedicated to the two runs through 
\&trjconv that are required to center everything properly. 
\&This also takes a whole bunch of space (3 copies of the xtc file). 
\&Still, the pictures are pretty and very informative when the fitted selection is properly made. 
\&3\-4 atoms in a widely mobile group like a free amino acid in solution works 
\&well, or select the protein backbone in a stable folded structure to get the SDF 
\&of solvent and look at the time\-averaged solvation shell. 
\&It is also possible using this program to generate the SDF based on some arbitrarty 
\&Cartesian coordinate. To do that, simply omit the preliminary trjconv steps. 

\&USAGE: 

\&1. Use make_ndx to create a group containing the atoms around which you want the SDF 

\&2. trjconv \-s a.tpr \-f a.xtc \-o b.xtc \-center tric \-ur compact \-pbc none 

\&3. trjconv \-s a.tpr \-f b.xtc \-o c.xtc \-fit rot+trans 

\&4. run g_spatial on the xtc output of step 3. 

\&5. Load grid.cube into VMD and view as an isosurface. 

\&*** Systems such as micelles will require trjconv \-pbc cluster between steps 1 and 2

\&WARNINGS: 

\&The SDF will be generated for a cube that contains all bins that have some non\-zero occupancy. 
\&However, the preparatory \-fit rot+trans option to trjconv implies that your system will be rotating 
\&and translating in space (in order that the selected group does not). Therefore the values that are 
\&returned will only be valid for some region around your central group/coordinate that has full overlap 
\&with system volume throughout the entire translated/rotated system over the course of the trajectory. 
\&It is up to the user to ensure that this is the case. 

\&BUGS: 

\&When the allocated memory is not large enough, a segmentation fault may occur. This is usually detected 
\&and the program is halted prior to the fault while displaying a warning message suggesting the use of the \-nab 
\&option. However, the program does not detect all such events. If you encounter a segmentation fault, run it again 
\&with an increased \-nab value. 

\&RISKY OPTIONS: 

\&To reduce the amount of space and time required, you can output only the coords 
\&that are going to be used in the first and subsequent run through trjconv. 
\&However, be sure to set the \-nab option to a sufficiently high value since 
\&memory is allocated for cube bins based on the initial coords and the \-nab 
\&(Number of Additional Bins) option value. 

.SH FILES
.BI "\-s" " topol.tpr" 
.B Input
 Structure+mass(db): tpr tpb tpa gro g96 pdb 

.BI "\-f" " traj.xtc" 
.B Input
 Trajectory: xtc trr trj gro g96 pdb cpt 

.BI "\-n" " index.ndx" 
.B Input, Opt.
 Index file 

.SH OTHER OPTIONS
.BI "\-[no]h"  "no    "
 Print help info and quit

.BI "\-[no]version"  "no    "
 Print version info and quit

.BI "\-nice"  " int" " 0" 
 Set the nicelevel

.BI "\-b"  " time" " 0     " 
 First frame (ps) to read from trajectory

.BI "\-e"  " time" " 0     " 
 Last frame (ps) to read from trajectory

.BI "\-dt"  " time" " 0     " 
 Only use frame when t MOD dt = first time (ps)

.BI "\-[no]w"  "no    "
 View output xvg, xpm, eps and pdb files

.BI "\-[no]pbc"  "no    "
 Use periodic boundary conditions for computing distances

.BI "\-[no]div"  "yes   "
 Calculate and apply the divisor for bin occupancies based on atoms/minimal cube size. Set as TRUE for visualization and as FALSE (\-nodiv) to get accurate counts per frame

.BI "\-ign"  " int" " \-1" 
 Do not display this number of outer cubes (positive values may reduce boundary speckles; \-1 ensures outer surface is visible)

.BI "\-bin"  " real" " 0.05  " 
 Width of the bins in nm

.BI "\-nab"  " int" " 4" 
 Number of additional bins to ensure proper memory allocation

.SH SEE ALSO
.BR gromacs(7)

More information about \fBGROMACS\fR is available at <\fIhttp://www.gromacs.org/\fR>.
